package com.irain.pp.tool.api.monitor;

import java.lang.reflect.Method;

/**
 * @author iRain
 * @date 2017/12/21 15:10
 */
public class MethodMonitorHelper {
    
    private static MethodMonitorSupport template;

    private MethodMonitorHelper(){}

    public static void register(MethodMonitorSupport template) {
        if (MethodMonitorHelper.template != null){
            throw new IllegalArgumentException("LockHelper has two service: "
                    + template.getClass().getName() + " AND " + MethodMonitorHelper.template.getClass().getName());
        }
        MethodMonitorHelper.template = template;
    }

    public static void updateMethodInfo(Method method){
        template.updateMethodInfo(method);
    }

}
